/*
 * CAppStateServer.h
 *
 *  Created on: 25/12/2012
 *      Author: Dalton
 */

#ifndef CAPPSTATESERVER_H_
#define CAPPSTATESERVER_H_
#include "CAppState.h"
#include <SDL/SDL.h>
#include "CNet.h"
#include <SDL/SDL_net.h>
#include <SDL/SDL_ttf.h>

class CAppStateServer : public CAppState{
	private:
		static CAppStateServer instance;
		SDL_Surface* surface;
		bool connected;
		CClientSocket* tcpClient;
		CHostSocket* tcpListener;
		CNetMessage msg;
		TTF_Font* font;
		SDL_Surface* textConnected;
		SDL_Surface* textReceived;

	private:
		CAppStateServer();
	 public:
	        void onActivate();

	        void onDeactivate();

	        void onLoop();

	        void onRender(SDL_Surface* surfDisplay);

	        static CAppStateServer* getInstance();

};


#endif /* CAPPSTATESERVER_H_ */
